home *** CD-ROM | disk | FTP | other *** search
- //
- // DJ Mix Pro plugin
- //
- // (C) 2001 Beatlock Technology
- //
- //
- // Allows to build graphical animations synchronized with music played in the DJ Mix Pro program
- // Allows to manage lights synchronized with music played in the DJ Mix Pro program
- // Allows to synchronize things in general with music played in the DJ Mix Pro program
- //
- //
- // The resulting DLL is to be dropped in the DJ Mix Pro
- // plugins folder. It will appear automaticaly in
- // the action menu, visualisation plugin submenu
- //
-
-
-
- #if !defined(DJMIXPLUGIN_INCLUDED)
- #define DJMIXPLUGIN_INCLUDED
-
-
- //if you dont have winuser.h
- //#define WM_USER 0x0400
- #include <winuser.h>
-
-
- //if your plugin decides to exit, you MUST just post a
- //PLUGGINUNLOADED message to the managing window
- //using a call like this :
- // SendMessage(parent, PLUGGINUNLOADED, 0, 0);
- //in this case, Unload will still be called, so
- //perform your cleanup in Unload method
- #define PLUGGINUNLOADED WM_USER+51
-
-
- //your plugin must inherit this class and
- //implement at least the 4 pure virtual methods
- //
- // class YourPlugin : public DJMixPlugin { ... };
- //
- class DJMixPlugin
- {
- public:
- DJMixPlugin(){};
- virtual ~DJMixPlugin(){};
-
- //developer of a plugin MUST implement these
- //Dont rely on constructor and destructor,
- //they will be called more than expected.
- //Do construction in load and destruction in unload
- //You have enough parameters to create windows if you want
- virtual void Load( HINSTANCE instance,HWND parent)=0;
- virtual void Unload( )=0;
- virtual char* GetName() = 0;
- //refresh will be called about 20 times per second
- //where is the pos in seconds in current song
- //closest is the beat position closest to position in current song
- //which is the closest beat number in current song
- //uses the number to check the discontinuity if needed
- virtual void Refresh(double where, double closest, long which) = 0;
- };
-
- //Your plugin DLL must export one C function called "CreateFunc"
- //used to create one object of this class
- //extern "C"
- //__declspec( dllexport ) DJMixPlugin* CreateFunc() {
- // return new YourPlugin();
- //}
- typedef DJMixPlugin* (*pluginCreateFunc) ();
-
- #endif
-